﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TraniningReport.ascx.cs" Inherits="WebUserControl_TraniningReport" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() {
       $("#<%= baocao.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= Button1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff'
        } }); 
         setTimeout($.unblockUI, 5000); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script> 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
 <Triggers> <asp:PostBackTrigger  ControlID="Button1"/></Triggers>
    <ContentTemplate>
    
<fieldset>
    <legend>Training Report</legend>
    <div class="fm-req">
      <label for="dr_TTPP">TTPP:</label>
      <asp:DropDownList ID="dr_TTPP" runat="server" Width="150px">
            </asp:DropDownList>
      </div>
      </fieldset>
      <div>
       <asp:Button ID="baocao" runat="server" Text="Báo cáo" onclick="baocao_Click" />
      &nbsp;&nbsp;
            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Export to excel" />
      </div>
<br />
            <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server">
                <Fields>
                    <dxwpg:PivotGridField ID="field" Area="FilterArea" AreaIndex="0" Caption="Khu vực" 
                        FieldName="Region">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field1" Area="FilterArea" AreaIndex="1" Caption="TTPP" 
                        FieldName="sitename">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field2" Area="RowArea" AreaIndex="0" 
                        Caption="Mã tuyến trên" FieldName="TeamLeader">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field3" Area="RowArea" AreaIndex="1" Caption="Level" 
                        FieldName="HightLevel">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field4" Area="RowArea" AreaIndex="2" Caption="Mã BA" 
                        FieldName="salesp_key" SortBySummaryInfo-SummaryType="Count" 
                        SummaryType="Count">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field5" Area="RowArea" AreaIndex="3" Caption="Tên" 
                        FieldName="salesp_name">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field6" Area="RowArea" AreaIndex="4" 
                        Caption="Địa chỉ" FieldName="Address">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field7" Area="RowArea" AreaIndex="5" Caption="Quận" 
                        FieldName="Town" Visible="False">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field8" Area="RowArea" AreaIndex="5" 
                        Caption="Tỉnh/TP" FieldName="ProvinceName">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field9" Area="RowArea" AreaIndex="6" 
                        Caption="Điện thoại" FieldName="Tel">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field10" Area="RowArea" AreaIndex="8" 
                        Caption="Mobile" FieldName="Mobile" Visible="False">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field11" Area="RowArea" AreaIndex="7" 
                        Caption="Chức danh" FieldName="chucdanh">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field12" Area="RowArea" AreaIndex="8" 
                        Caption="Ngày gia nhật" FieldName="ContractDate">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field13" Area="ColumnArea" AreaIndex="0" 
                        Caption="Course" FieldName="Course">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field14" Area="DataArea" AreaIndex="0" 
                        Caption="value" FieldName="value" SummaryType="Count">
                    </dxwpg:PivotGridField>
                </Fields>
                <OptionsView ShowColumnHeaders="False" ShowColumnTotals="False" 
                    ShowDataHeaders="False" ShowRowGrandTotals="False" />
                <OptionsPager NumericButtonCount="15">
                </OptionsPager>
            </dxwpg:ASPxPivotGrid>
       

    <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
    </ContentTemplate>
</asp:UpdatePanel>
<dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" runat="server" 
    ASPxPivotGridID="ASPxPivotGrid1">
</dxpgw:ASPxPivotGridExporter>

